Skip to content

[4주차] 이건희/[feat] 추가 API 구현#147

Open
KunHeeLee7 wants to merge 4 commits intoLeets-Official:이건희/mainfrom
KunHeeLee7:이건희/4주차

Hidden character warning

The head ref may contain hidden characters: "\uc774\uac74\ud76c/4\uc8fc\ucc28"
Open

[4주차] 이건희/[feat] 추가 API 구현#147
KunHeeLee7 wants to merge 4 commits intoLeets-Official:이건희/mainfrom
KunHeeLee7:이건희/4주차

Conversation

@KunHeeLee7
Copy link
Copy Markdown

@KunHeeLee7 KunHeeLee7 commented Apr 28, 2026

1. 과제 요구사항 중 구현한 내용

  • 게시글 신고 기능 구현
  • 유저를 통한 게시글 숨김 기능 구현
  • 누적 신고에 따른 게시글 자동 숨김 처리 구현
  • 관리자가 신고를 확인하고 게시글 숨김 처리 구현

2. 핵심 변경 사항

  1. 포스트 상태 컬럼 추가 및 숨김 API 구현
  2. 신고 도메인 구현 (baseReportEntity를 사용하여 추후 확장성 고려)
  3. 신고 API 기능 및 예외 처리 구현
  4. 신고 누적 또는 관리자에 의한 숨김 처리 구현.
  5. 신고 3회 이상 누적 시 자동으로 숨김 처리.

3. 실행 및 검증 결과

게시글 숨김 처리
게시글 숨김 처리

게시글 숨김 처리 권한 없을 시 예외처리
게시글 숨김 처리 권한 X

게시글 신고
게시글 신고1

게시글 중복 신고 예외처리
게시글 신고 중복 예외처리

관리자에 의한 게시글 숨김 처리
게시글 관리 숨김처리

4. 완료 사항

  1. 게시글 신고 기능 구현
  2. 유저를 통한 게시글 숨김 기능 구현
  3. 신고 처리 및 상태 변경

5. 추가 사항

제출 체크리스트

  • PR 제목이 규칙에 맞다
  • base가 {이름}/main 브랜치다
  • compare가 {이름}/{숫자}주차 브랜치다
  • 프로젝트가 정상 실행된다
  • 본인을 Assignee로 지정했다
  • 파트 담당 Reviewer를 지정했다
  • 리뷰 피드백을 반영한 뒤 머지/PR close를 진행한다

Reviewer 참고

@KunHeeLee7 KunHeeLee7 requested a review from a team April 28, 2026 09:38
@KunHeeLee7 KunHeeLee7 self-assigned this Apr 28, 2026
return PostReportResponseDTO.builder()
.reportId(report.getReportId())
.postId(report.getPost().getPostId())
.reporterId(report.getReporter().getUserId())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 메서드는 DTO 생성주기를 service에서 관리하게 되어서 dto 수정시 service 까지 수정해야 해서 유지보수의 어려움이 있을것같습니다 DTO안에서 직접 해당 메서드를 관리하면 DTO가 자기자신의 생명주기를 전부 관리하게 되므로 높은 응집도를 가져 좋은 설계가 될 것 같습니다.

@KunHeeLee7 KunHeeLee7 requested a review from a team April 29, 2026 12:41
@Table(name = "post_reports")
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class PostReport extends BaseReport {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 설계에서는 report 타입 별로 데이터베이스 테이블을 따로 가지기 때문에 관리가 힘들고 새로운 도메인에 대한 신고 기능을 구현할 때 기존 코드를 재사용하기 힘들어 확장성이 떨어지는 단점이 있을 것 같습니다. 똑같은 기능을 구현할 때 다양한 설계와 장단점들을 고려해보는 것도 좋을 것 같습니다.

Copy link
Copy Markdown

@kangyeson kangyeson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GlobalExceptionHandler로 전체 공통 예외처리 폼을 구현하신 점 좋습니다! 고생하셨습니다~!🐶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants